8623bf2c38a2fcc4243355aeef7e316cf9283daf,yggdrasil-backend/src/main/java/yushijinhun/authlibagent/web/manager/ProfileResourceImpl.java,ProfileResourceImpl,deleteProfile,#UUID#,120
Before Change
@Override
public void deleteProfile(UUID uuid) {
sessionFactory.getCurrentSession().delete(lookupProfile(uuid));
}
@Override
After Change
GameProfile profile = lookupProfile(uuid);
// if it's a selected profile, we need to unselect it first
Account owner = profile.getOwner();
if (profile.equals(owner.getSelectedProfile())) {
owner.setSelectedProfile(null);
}
Session session = sessionFactory.getCurrentSession();
session.update(owner);
session.delete(profile);
}
@Override